<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('index')}">备用金</a></li>
        <li class="active"><a>编辑</a></li>
    </ul>
    <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('doedit')}">


        <div class="form-group">
            <label for="js-smtpsecure" class="col-sm-2 control-label">
                <span class="form-required">*</span>时间
            </label>
            <div class="col-md-6 col-sm-10">
                <input type="date" class="form-control" name="date" value="{$res['date']}">
            </div>
        </div>


        <div class="form-group">
            <label for="js-smtpsecure" class="col-sm-2 control-label">
                <span class="form-required">*</span>支付方式
            </label>
            <div class="col-md-6 col-sm-10">
                <select name="pay" class="form-control">
                    <?php
                        if($res['pay'] == 1){
                        ?>
                    <option value="1">微信</option>
                    <?php
                        }elseif($res['pay'] == 2){
                        ?>
                    <option value="2">支付宝</option>
                    <?php
                        }elseif($res['pay'] == 3){
                    ?>
                    <option value="3">银行卡</option>
                    <?php
                        }elseif($res['pay'] == 4){
                        ?>
                    <option value="4">现金</option>
                    <?php
                        }
                        ?>
                    <option value="1">微信</option>
                    <option value="2">支付宝</option>
                    <option value="3">银行卡</option>
                    <option value="4">现金</option>
                </select>
            </div>
        </div>

        <div class="form-group">

            <label for="js-smtpsecure" class="col-sm-2 control-label">
                <span class="form-required">*</span>收款人
            </label>
            <div class="col-md-6 col-sm-10">
                <select name="payee" class="form-control" id="">
                    <option value="{$res['payee']}">{$res['payeename']}</option>
                    <volist name="user" id="v">
                        <option value="{$v.id}">{$v.name}</option>
                    </volist>
                </select>
            </div>
        </div>

        <div class="form-group">

            <label for="js-smtpsecure" class="col-sm-2 control-label">
                <span class="form-required">*</span>事件
            </label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" name="desc" value="{$res['desc']}">
            </div>
        </div>

        <div class="form-group">

            <label for="js-smtpsecure" class="col-sm-2 control-label">
                <span class="form-required">*</span>单位
            </label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" name="unit" value="{$res['unit']}" readonly>
            </div>
        </div>

        <div class="form-group">

            <label for="js-smtpsecure" class="col-sm-2 control-label">
                <span class="form-required">*</span>金额
            </label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" name="price" value="{$res['price']}">
            </div>
        </div>





        <div class="form-group">

            <label for="js-smtpsecure" class="col-sm-2 control-label">
                <span class="form-required">*</span>所属项目
            </label>
            <div class="col-md-6 col-sm-10">
                <select name="reim" class="form-control">
                    <option value="{$res.reim}">{$res['reimName']}</option>
                    <volist name="en" id="v">
                        <option value={$v.id}">{$v.name}</option>
                    </volist>
                </select>
            </div>
        </div>

        <div class="form-group">

            <label for="js-smtpsecure" class="col-sm-2 control-label">
                <span class="form-required">*</span>备注
            </label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" name="title" value="{$res['title']}">
            </div>
        </div>

        <div class="form-group">

            <label for="js-smtpsecure" class="col-sm-2 control-label">图片
            </label>
            <div class="col-md-6 col-sm-10">
                <volist name="res['imgs']" id="v">
                    <?php if($v != $_SERVER['SERVER_NAME']){?>
                    <img src="{$v}" alt="">
                    <?php }?>
                </volist>
            </div>
        </div>

        <div class="form-group">

            <label for="js-smtpsecure" class="col-sm-2 control-label">图片
            </label>
            <div class="col-md-6 col-sm-10">
                <input type="file" name="imgs[]" class="form-control" multiple>
            </div>
        </div>

        <input type="hidden" name="id" value="{$res['id']}">
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
                <a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
            </div>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>